#ifndef _PMD_GLOBALS_H
#define _PMD_GLOBALS_H (1)
/*
 * PmdGlobals.h
 * Created on Feb 23, 2004; 2:56 PM
 * by sriram
 */
/*
** Copyright 2004 by Hellosoft Inc. All rights reserved. No part
** of this publication, or any software included with it, may be
** reproduced, stored in a retrieval system, or transmitted in
** any form or by any other means, including photocopying,
** electronic or mechanical recording or otherwise, without
** prior written permission of the copyright holder
**
** Hellosoft Confidential and Proprietary information
**
**-------------------------------------------------------------
**/



#include "HsTypes.h"
#include "PhyConstants.h"

#define MAX_PAYLOAD_SIZE    (2*1024)

#define SPIN(N)	{int i; for(i=0; i<N; i++)__sb_barrier();}

//#define PRINT_ON

#ifdef RUN_ON_BOARD

#ifdef PRINT_ON

#define PRINT(x)    printf(x)
#define PRINT1(x)    printf(x)
#define PRINT2(x,y)    printf(x,y)
#define PRINT3(x,y,z)    printf(x,y,z)
#define PRINT4(x,y,z,zz)    printf(x,y,z,zz)

#else

#define PRINT(x)
#define PRINT2(x,y)
#define PRINT3(x,y,z)
#define PRINT4(x,y,z,zz)

#endif

#else

#define PRINT(x)    __putstring(x)
#define PRINT2(x,y)    __putstring(x,y)
#define PRINT3(x,y,z)    __putstring(x,y,z)
#define PRINT4(x,y,z,zz)    __putstring(x,y,z,zz)

#define UART_TEST (0)
#define NO_UART_TEST (1)
#endif

void __sb_barrier();

enum {
    ATOD_STOPPED,
    ATOD_RUNNING
};


extern volatile hs_int32_t PayloadLen;
extern volatile unsigned rate_err;
extern volatile unsigned sfd_err;

extern volatile hs_int32_t start_transmit;
extern volatile hs_int32_t atod_status;
extern volatile hs_int32_t init_done_tx[7];

extern hs_uint8_t PayloadBytes[MAX_PAYLOAD_SIZE];//[MAX_PAYLOAD_SIZE];
extern hs_uint8_t TxPayload[MAX_PAYLOAD_SIZE];

extern volatile  hs_int32_t rx_status;
extern volatile  hs_int32_t init_done_th[8];

#endif


